package JDBC_Test.Student.Model;

import java.io.Serializable;

public class StudentModel implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String name;
	private Integer age;
	private Integer sex;//0男1女
	private String sno;
	private String dept;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public String getSno() {
		return sno;
	}
	public void setSno(String sno) {
		this.sno = sno;
	}
	public String getDept() {
		return dept;
	}
	public void setDept(String dept) {
		this.dept = dept;
	}
	@Override
	public String toString() {
		if(this.getSex()==0) {
			return "Student [name=" + name + ", age=" + age + ", sex=" + "男" + ", sno=" + sno + ", dept=" + dept + "]";
		}else {
			
			return "Student [name=" + name + ", age=" + age + ", sex=" + "女" + ", sno=" + sno + ", dept=" + dept + "]";
		}
	}
	public StudentModel(String name, Integer age, Integer sex, String sno, String dept) {
		super();
		this.name = name;
		this.age = age;
		this.sex = sex;
		this.sno = sno;
		this.dept = dept;
	}
	public StudentModel() {}
	
}
